package com.autoagent.ai_live_master.scriptRecommendation.entity;
import com.autoagent.ai_live_master.scriptRecommendation.Enum.*;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 直播计划配置表
 * </p>
 */
@Data
@TableName(value = "live_streaming_plan", autoResultMap = true)
public class LiveStreamingPlan {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private Long userId;

    private Long scriptId;
    
    private Long liveRoomId;

    private String name;

    private String type;

    private String style;

    private Boolean expanded;

    private Boolean enabled;

    private String info;

    private LocalDateTime startTime;

    private LocalDateTime endTime;

    private String recommendationPriority;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<AbnormalNotification> abnormalNotification;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private Configuration configuration;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> bannedWords;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> ecommerceRevenue;

    private Boolean blockLuckyBagData;

    private Boolean blockLotteryData;

    private String gender;

    private String area;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> age;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> interest;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @Data
    public static class AbnormalNotification implements Serializable {
        private String id;
        private String label;
        private String maxValue;
        private String minValue;
    }

    @Data
    public static class Configuration implements Serializable {
        private InlinePeople inlinePeople;
        private OnlineChanges onlineChanges;
        private ClickThroughRate clickThroughRate;

        @Data
        public static class InlinePeople implements Serializable {
            private String style;
            private String custom;
        }

        @Data
        public static class OnlineChanges implements Serializable {
            private String style;
            private String custom;
        }

        @Data
        public static class ClickThroughRate implements Serializable {
            private String style;
        }
    }
}

